#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#include<string.h>
#include<stdbool.h>

typedef int HPdataType;
typedef struct Heap
{
	HPdataType* a;
	int size;
	int capacity;
}HP;
void Swap(int* p1, int* p2);

void AdjustDown(int* a, int n, int parent);

void AdjustUp(int* a, int child);

//HP* HeapInit(HPdatatype* a,int n);
void HeapInit(HP* php, HPdataType* a, int n);

void HeapDestory(HP* php);

void HeapPush(HP* php, HPdataType x);

void HeapPop(HP* php);

HPdataType HeapTop(HP* php);

int HeapSize(HP* php);

bool HeapEmpty(HP* php);

void HeapPrint(HP* php);
